package com.csii.adhoc.dataunits;

import lombok.Data;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

@Data
public class TextSelected {
    private String colType;
    private String colName;
    //列英文名
    private String colEn;
    //列颜色配置，数据库表关联：t_pic_attr /cell_id
    private String columnColor;
    //列形状配置
    private List<SharpCondition> columnSharp;
    //排序类型，asc:升序，desc:降序 def :自定义，可多个字段组件使用
    private String orderType;
    //排序的字段
    private String sortColName;
    //当排序为自定义排序时，这里为所有重新排序后的列的值
    private List<String> defSortValues;
    //分组类型，same 相同值为一组，def:自定义
    private String groupType;
    /*  如果不为自定义分组，本字段为""
        如果为自定义分组,为多个分组名下的分组字段集合,例如
        {
        "分组1":{'张三',‘李四','王五'}，
        "分组2":{'张三',‘李四','王五'}，
        'default:{others}  //说明，所有未分组的是放入到 default，（也是组名)，如果不需要，则不设 other 组
        }
     */
    private Map<String, List<String>> defGroups;
    //显示名，可为中文，英文
    private String showName;
    //是否显示该字段
    private boolean beShow;
    //所有已经打开的列信息
    private String[] openedValues;

    public String getColEn() {
        return colEn;
    }

    public void setColEn(String colEn) {
        this.colEn = colEn;
    }

    public String getColumnColor() {
        return columnColor;
    }

    public void setColumnColor(String columnColor) {
        this.columnColor = columnColor;
    }

    public List<SharpCondition> getColumnSharp() {
        return columnSharp;
    }

    public void setColumnSharp(List<SharpCondition> columnSharp) {
        this.columnSharp = columnSharp;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getSortColName() {
        return sortColName;
    }

    public void setSortColName(String sortColName) {
        this.sortColName = sortColName;
    }

    public List<String> getDefSortValues() {
        return defSortValues;
    }

    public void setDefSortValues(List<String> defSortValues) {
        this.defSortValues = defSortValues;
    }

    public String getGroupType() {
        return groupType;
    }

    public void setGroupType(String groupType) {
        this.groupType = groupType;
    }

    public Map<String, List<String>> getDefGroups() {
        return defGroups;
    }

    public void setDefGroups(Map<String, List<String>> defGroups) {
        this.defGroups = defGroups;
    }

    public String getShowName() {
        return showName;
    }

    public void setShowName(String showName) {
        this.showName = showName;
    }

    public boolean isBeShow() {
        return beShow;
    }

    public void setBeShow(boolean beShow) {
        this.beShow = beShow;
    }

    public String[] getOpenedValues() {
        return openedValues;
    }

    public void setOpenedValues(String[] openedValues) {
        this.openedValues = openedValues;
    }

    @Override
    public String toString() {
        return "TextSelected{" +
                "colEn='" + colEn + '\'' +
                ", columnColor='" + columnColor + '\'' +
                ", columnSharp=" + columnSharp +
                ", orderType='" + orderType + '\'' +
                ", sortColName='" + sortColName + '\'' +
                ", defSortValues=" + defSortValues +
                ", groupType='" + groupType + '\'' +
                ", defGroups=" + defGroups +
                ", showName='" + showName + '\'' +
                ", beShow=" + beShow +
                ", openedValues=" + Arrays.toString(openedValues) +
                '}';
    }
}
